﻿@model Fcom.VNInsurance.Web.Models.CPInfo
@{
    ViewBag.Title = Model.ProductName;
    var LangCat = (Fcom.VNInsurance.Web.Models.ProductCatLang)ViewBag.LangCat;
    Layout = "~/Views/Shared/_0311layout.cshtml";
    var productFAQ = (IEnumerable<Fcom.VNInsurance.Web.Models.ProductFAQ>)ViewBag.productFAQ;
    var benefitslist = (IEnumerable<Fcom.VNInsurance.Web.Models.BenefitFare>)ViewBag.benefits;
    long fare = 0, insuancemoney = 0;
    var motochoose = (Fcom.VNInsurance.Web.Models.MotoCatelogChoose)ViewBag.MotoChoose;
    var Userinfo = (Fcom.IDLib.SaveMoneyID.FullUserInfo)ViewBag.Userinfo;
    var motopapers = (IEnumerable<Fcom.VNInsurance.Web.Models.CompanyProductPaper>)ViewBag.motopaper;
}
<style>
    .container ul {
        margin: inherit;
width: inherit;
display: inherit;
padding: inherit;
    }
     .container ul li{
        margin: inherit;
width: inherit;
display: inherit;
padding: inherit;
border:none !important;
    }
      
</style>
<div class="container">
     <ul class="breadcrumb" style="margin-bottom:0px !important">
                      <li><a href="@Url.Action("Index", "Home")">@Fcom.VNInsurance.Web.LangResource.Layout.lblHome</a></li>
                      <li><a href="#">@LangCat.DisplayName</a></li>
                      <li class="active">@Model.ProductName</li>
      </ul>
            <div style="clear:both"></div>
    <div class="top_slider container" id="afocus">
             <div class="col-lg-7" style="padding-top:10px;font-weight:bold;">
             @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblComapreMaket
             </div>
			<div class="col-lg-4">
                        <ol class="top_bar">
                        <li><a class="active" id="show_div" href="@Url.Action("Motobike","Moto")"><span >@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblinfomation</span></a> </li>
                        <li><a class="bar_2_active" href="@Url.Action("MotobikeCompare","Moto")"><span>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblcomparison</span></a></li>
                        <li><a class="bar_3_active" href="@Url.Action("MotobikeApply", "Moto", new { ID=Model.CProductID})"><span style="font-weight:bold;">@Fcom.VNInsurance.Web.LangResource.Layout.lblPolicy</span></a></li>
                        <li style="width: 70px !important;"><a class="bar_4"><span>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblfinish</span></a></li>
                    </ol>
            <div style="clear:both"></div>
			</div>
           <div style="clear:both"></div>
        </div>
</div>

<div class="container" style="margin-top:10px;">
    <div class="accleft">
              
    <table class="table" id="tbcomparelt">
                     <thead>
                         <tr style="text-align:center;font-weight:bold">
                             <td>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblbenefitdisplay</td><td>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblmotofare</td>
                         </tr>
                     </thead>
                     <tbody>
                         @foreach (var li in benefitslist)
                         {
                              <tr><td>
                                    @li.BenefitName
                                 </td>
                                
                             @if (li.isMotoCC)
                             {
                                 if (motochoose.CC > 50)
                                 {
                                     fare += li.MotoUp;
                                      <td align="center">
                                    @String.Format("{0:#,###}", li.MotoUp)
                                 </td>
                                 }
                                 else
                                 {
                                     fare += li.MotoDown;
                                         <td align="center">
                                    @String.Format("{0:#,###}", li.MotoDown)
                                 </td>
                                 }
                             }
                             else if (li.RateBenefit)
                             {
                                 double tilefare = Math.Round(motochoose.MotoPrice * li.Rate, 0);
                                 fare += Convert.ToInt64(tilefare);
                                  <td align="center">
                                    @String.Format("{0:#,###}",tilefare)
                                 </td>
                             }
                             else
                             {
                                 fare += li.Fare;
                                    <td align="center">
                                    @String.Format("{0:#,###}", li.Fare)
                                 </td>
                             }
                            
                             </tr>
                         }
                         <tr>
                             <td align="right">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lbltotalpremium</td>
                             <td align="center" style="color:red;font-weight:bold">
                                 <span>@String.Format("{0:#,###}", fare)</span> VND
                             </td>
                         </tr>
                     </tbody>
                    
                 </table>
        <div id="imgpaper">
            @foreach (var p in motopapers)
            { 
                <a class="fcmotopaper" rel="fc_group" href="@Url.Content("~/Content/Paper/"+p.imageName)">
                    <img src="@Url.Content("~/Content/Paper/"+p.imageName)" style="width:50px; height:50px;" />
                </a>
            }
        </div>
    </div>
     <div class="accright">   
        <strong style="color:#501AC4">
            @Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblInsuranceinfo </strong><br />
            <form method="post" id="frmcollect">
            <ul>
               
					    
                            <li>
                                @Html.Hidden("CProductID",Model.CProductID)
                                <label style="width:300px">
                                    @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblouwner</label>
                                    <input class="poshyme" style="width:200px;" id="txt_owner" type="text" name="txt_owner" maxlength="50" value="@Userinfo.Fullname" title="@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblpowners"> (*)
                            </li>
                            <li>
                               <label style="width:300px">
                                   @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblmotoaddress</label>
                             
                                    <input class="poshyme" style="width:200px;" id="txt_address_register" name="txt_address_register" type="text" maxlength="100" value="@Userinfo.Address" title="@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblpaddress"> (*)
                                  
                            </li>
                             <li >
                                <label style="width:300px">
                                   @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblregisternumber</label>
                               
                                    <input  class="poshyme" style="width:200px;" id="txt_bikeid" name="txt_bikeid" type="text" title="@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblpregnumber"> (*)
                                  
                            </li>
							
							 <li >
                                <label style="width:300px">
                                  @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblenginenumer</label>
                               
                                    <input class="poshyme" style="width:200px;" id="txt_machineid" name="txt_machineid" type="text" title="@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblpmechina">
                                  
                            </li>
							 <li>
                        <label style="width:300px">
                                  @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblChassic</label>
                                
                                    <input class="poshyme" style="width:200px;" id="txt_frameid" name="txt_frameid" type="text" title="@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblengine">
                                   
                            </li>
							 <li >
                               <label style="width:300px">
                                  @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblperiod <br />@Fcom.VNInsurance.Web.LangResource.ContactLayout.lbloneyear </label>
                           
                                 @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblfrommoto <select style="margin-left:3px;margin-right:3px;" name="hour">
									@for (int ia = 1; ia <= 24;ia++ )
                                     {  
                                         <option value="@ia">@ia @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblhour</option>
                                     }                        
								 </select>
								<input class="poshyme" style="width: 75px;margin-left: 3px;" id="txt_date" name="txt_date" type="text" readonly title="@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblpchoosedate"> (*)
                                        <div style="clear:both"></div>
                            </li>
							
                           
                        
            </ul> <br />
         <strong style="color:#501AC4">@Model.ProductName
         </strong><br />
                <ul>
                    <li>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblinsurancecomapny:@Model.CompanyName</li>
                    <li> <img style="width:130px;height:80px" alt="@Model.ProductName" src="@Url.Content("~/Content/images/CompanyLogo/" + Model.CompanyLogo)" title="@Model.ProductName"/></li>
                </ul>
               
                <div style="clear:both"></div>
                <br /> <strong style="color:#501AC4">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblmotofare
         </strong><br />
                 <table class="table" id="tbcompare">
                     <thead>
                         <tr>
                             <th>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblbenefitdisplay</th><th>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblInsuranceMoneytext</th><th>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblmotofare</th>
                         </tr>
                     </thead>
                     <tbody>
                         @{fare = 0;}
                         @foreach (var li in benefitslist)
                         {
                              <tr><td>
                                    @li.BenefitName
                                 </td>
                                  <td style="text-align:center">
                                    @if (li.InsbyMoto)
                                    { 
                                        @String.Format("{0:#,###}", motochoose.MotoPrice) 
                                    }
                                    else  if (li.RateBenefit)
                                    { 
                                        @String.Format("{0:#,###}", motochoose.MotoPrice) 
                                    }
                                    else
                                    { 
                                         @String.Format("{0:#,###}",li.InsMoney)
                                    }
                                 </td>
                             @if (li.isMotoCC)
                             {
                                 if (motochoose.CC > 50)
                                 {
                                     fare += li.MotoUp;
                                      <td align="center">
                                    @String.Format("{0:#,###}", li.MotoUp)
                                 </td>
                                 }
                                 else
                                 {
                                     fare += li.MotoDown;
                                         <td align="center">
                                    @String.Format("{0:#,###}", li.MotoDown)
                                 </td>
                                 }
                             }
                             else if (li.RateBenefit)
                             {
                                 double tilefare = Math.Round(motochoose.MotoPrice * li.Rate, 0);
                                 fare += Convert.ToInt64(tilefare);
                                  <td align="center">
                                    @String.Format("{0:#,###}",tilefare)
                                 </td>
                             }
                             else
                             {
                                 fare += li.Fare;
                                    <td align="center">
                                    @String.Format("{0:#,###}", li.Fare)
                                 </td>
                             }
                             </tr>
                         }
                     </tbody>
                    
                 </table>
               
                <div id="InsuanceFare">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lbltotalpremium<span class="tongphi">:</span> <span class="phi">@String.Format("{0:#,###}", fare)</span> VND</div>
                               
                <br />
                 <strong style="color:#501AC4">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblinsured
         </strong><br />
                <ul>
                            <li>
                                 <label style="width:300px">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblFullnamemoto</label>

                                    <input id="txt_name" type="text" name="txt_name" maxlength="100" onchange="name_change()" value="@Userinfo.Fullname"> (*)
                                   
								
                            </li>
                              <li>
                                <label style="width:300px">
                                   Email</label>
                          
                                    <input id="txt_email" name="txt_email" type="text" maxlength="100" onchange="email_change()" value="@Userinfo.Email"> (*)
                                 

                            </li>
                               <li>
                                 <label style="width:300px">
                                    @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblPhone</label>
                              
                                    <input id="txt_phone" name="txt_phone" type="text" maxlength="11" onchange="phone_change()" value="@Userinfo.Phone"> (*)
                                   
                          
                            </li>
							   <li>
                                <label style="width:300px">
                                   @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblAddress</label>
                          
                                    <input id="txt_address" name="txt_address" type="text" maxlength="100" value="@Userinfo.Address">             
                          
                            </li>
							
							
                           
                        </ul>
                

                <div class="agreedv">
               
                 <input type="submit" class="btn" id="btnsubmitf" style="background:#ff6a00;color:#fff;" value="@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblcontinuetn"/>
                    </div>
            </form>
            
    </div>
    <div style="clear:both"></div>
</div>
<div id="summary"></div>
<div style="padding-left:30px;padding-right:30px;padding-top:10px;line-height:25px;" class="ctcontainer"> @Html.Raw(HttpUtility.HtmlDecode(Model.Intro))</div>
<div class="container">
    <p id="vnquestion-fb"> @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblIfhaveQuestion</p>
   
</div>
<div class="container">
    <div class="accright">   
   
          <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'vnbaohiemcom'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function () {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
  
    
        </div>

 <div class="accleft">
              
     <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FVnbaohiem&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;header=false&amp;stream=false&amp;show_border=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:260px;" allowTransparency="true"></iframe>   
         <div class="container">
                              <!-- AddThis Button BEGIN -->
        <div class="addthis_toolbox addthis_default_style ">
        <a class="addthis_button_preferred_1"></a>
        <a class="addthis_button_preferred_2"></a>
        <a class="addthis_button_preferred_3"></a>
        <a class="addthis_button_preferred_4"></a>
        <a class="addthis_button_compact"></a>
        <a class="addthis_counter addthis_bubble_style"></a>
        </div>
     
        <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52116863612dd7b2"></script>
        <!-- AddThis Button END -->
         </div>
    </div>
    
<div style="clear:both"></div>
    </div>
<script>
    $(document).ready(function () {

        var AppUrl = $("#AppUrl").html();
        //frmcollect
        $("a[rel=fc_group]").fancybox();
        var validator = $("#frmcollect").bind("invalid-form.validate", function () {
            //$("#summary").html("Your form contains " + validator.numberOfInvalids() + " errors, see details below.");
        }).validate({

            errorElement: "em",
            errorContainer: $("#warning, #summary"),
            errorPlacement: function (error, element) {
                element.parent().children("em").remove();
                error.appendTo(element.parent());
            },
            success: function (label) {
                label.addClass("success");
                label.removeClass("error");
            },
            rules: {
                txt_owner: {
                    required: true,
                },
                txt_address_register: {
                    required: true,
                },
                txt_bikeid: {
                    required: true,
                },
              
                txt_date: {
                    required: true,
                },
                //txt_frameid
                txt_name: {
                    required: true,
                },
                txt_email: {
                    required: true,
                },
                txt_phone: {
                    required: true,
                },
                txt_address: {
                    required: true,
                }

            },
            messages: {
                required: "Required input",
                number: "Chỉ nhập số",
                minlength: jQuery.format("Please, at least {0} characters are necessary")
            }
        });
        //
        var dlimit = new Date();

        $("#txt_date").datepicker({
            showOn: "button",
            changeMonth: true,
            changeYear: true,
            showButtonPanel: true,
            minDate: new Date(),
            buttonImage: "/Content/images/calendar.gif",
            buttonImageOnly: true,
            dateFormat: "dd/mm/yy"
        });


        
    });
</script>